<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        input{
            /* padding: 200px; */
        }
    </style>
</head>
<body>
    <input type="text" name="hd"/>
    <ul></ul>
</body>
<script>
    let obj = {
        data: new Set(),
        
        set keyword(word){
            this.data.add(word);
        },

        show(){
            let ul = document.querySelector('ul');
            ul.innerHTML = "";

            this.data.forEach(function(value){
                ul.innerHTML += `<li>${value}</li>`;
            })
        }
    }

    let input = document.querySelector("[name='hd']");
    input.addEventListener("blur", function(){
        obj.keyword = this.value.trim();
        obj.show();
    })

</script>
</html>